<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="120px">
      <el-form-item label="主标题">
        <el-input v-model="form.title" />
      </el-form-item>
      <el-form-item label="副标题">
        <el-input v-model="form.subtitle" />
      </el-form-item>
      <el-form-item label="显卡">
        <el-input v-model="form.graphics" />
      </el-form-item>
      <el-form-item label="分辨率">
        <el-input v-model="form.resolution" />
      </el-form-item>
      <el-form-item label="单价">
        <el-input v-model="form.price" />
      </el-form-item>
      <el-form-item label="服务承诺">
        <el-input v-model="form.commitment" />
      </el-form-item>
      <el-form-item label="规格">
        <el-input v-model="form.specifications" />
      </el-form-item>
      <el-form-item label="商品名称">
        <el-input v-model="form.productName" />
      </el-form-item>
      <el-form-item label="操作系统">
        <el-input v-model="form.os" />
      </el-form-item>
      <el-form-item label="内存容量">
        <el-input v-model="form.memory" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">提交</el-button>
        <el-button @click="onCancel">取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        title: '',
        subtitle: '',
        graphics: '',
        resolution: '',
        price: '',
        commitment: '',
        specifications: '',
        productName: '',
        os: '',
        memory: ''
      }
    }
  },
  methods: {
    onSubmit() {
      this.$message.success('提交成功!')
    },
    onCancel() {
      this.$message({
        message: 'cancel!',
        type: 'warning'
      })
    }
  }
}
</script>

<style scoped>
.line{
  text-align: center;
}
</style>

